<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: shixi006
  Date: 2017/7/21
  Time: 16:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        a{
            text-decoration: none;
        }

    </style>

</head>

<body>

<a href="test.do" >查看所有(from redis)</a>
<a href="saveAll.do">mysql到redis </a>
<div style="text-align: center" >
    <h1>产品列表</h1>
    <div style="text-align: right;margin-right: 14%;" >
        <span><a href="deleteAll.do">删除所有</a> </span>
        <span><a href="add.do">添加</a> </span>
    </div>

    <table style="margin: 20px auto" cellpadding="20" cellspacing="0" border="2" >
        <tr>

            <th>产品编号</th>
            <th>缩图</th>
            <th>产品名</th>
            <th>产品描述</th>
            <th>产品价格</th>
            <th>创建时间</th>
            <th>操作</th>

        </tr>

        <c:forEach items="${all}" var="pro"  >
            <tr>
            <td>${pro.value.id}</td>
            <td><img height="100" width="150" src="${pro.value.image}" ></td>
            <td>${pro.value.proName}</td>
            <td>${pro.value.productDes}</td>
            <td>${pro.value.price}</td>
            <td>${pro.value.createTime}</td>
                <td><a href="delete.do?id=${pro.value.id}">删除</a>&nbsp;&nbsp;
                    <a href="update.do?id=${pro.value.id}">修改</a></td>
            </tr>>
        </c:forEach>
    </table>
</div>
</body>
</html>
